﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows;
using Heroius.Extension;
using Heroius.Files;
using System.IO;
using System.Drawing;
using Heroius.Extension.WPF;

namespace IEPI.BIATranscribe
{
    public class ImageTransInfo: ObservableEntity
    {
        /// <summary>
        /// 安全文件名
        /// </summary>
        [EntitySilo, PropertyPanel(Order = -1)]
        public string FileName { get { return _fileName; } set { _fileName = value; RaisePropertyChangedEvent("FileName"); } } string _fileName = "";

        [EntitySilo, PropertyPanel(Label = "左下X", Order = 5)]
        public double LeftBottomX { get { return _LeftBottomX; } set { _LeftBottomX = value; RaisePropertyChangedEvent("LeftBottomX"); RaisePropertyChangedEvent("Locator"); } }
        double _LeftBottomX = 0;
        [EntitySilo, PropertyPanel(Label = "左下Y", Order = 7)]
        public double LeftBottomY { get { return _LeftBottomY; } set { _LeftBottomY = value; RaisePropertyChangedEvent("LeftBottomY"); RaisePropertyChangedEvent("Locator"); } }
        double _LeftBottomY=0;

        [EntitySilo, PropertyPanel(Label ="左上X", Order = 1)]
        public double LeftTopX { get { return _LeftTopX; } set { _LeftTopX = value; RaisePropertyChangedEvent("LeftTopX"); RaisePropertyChangedEvent("Locator"); } }
        double _LeftTopX = 0;
        [EntitySilo, PropertyPanel(Label = "左上Y", Order = 3)]
        public double LeftTopY { get { return _LeftTopY; } set { _LeftTopY = value; RaisePropertyChangedEvent("LeftTopY"); RaisePropertyChangedEvent("Locator"); } }
        double _LeftTopY = 297;

        [EntitySilo, PropertyPanel(Label = "右下X", Order = 6)]
        public double RightBottomX { get { return _RightBottomX; } set { _RightBottomX = value; RaisePropertyChangedEvent("RightBottomX"); RaisePropertyChangedEvent("Locator"); } }
        double _RightBottomX=210;
        [EntitySilo, PropertyPanel(Label = "右下Y", Order = 8)]
        public double RightBottomY { get { return _RightBottomY; } set { _RightBottomY = value; RaisePropertyChangedEvent("RightBottomY"); RaisePropertyChangedEvent("Locator"); } }
        double _RightBottomY=0;

        [EntitySilo, PropertyPanel(Label = "右上X", Order = 2)]
        public double RightTopX { get { return _RightTopX; } set { _RightTopX = value; RaisePropertyChangedEvent("RightTopX"); RaisePropertyChangedEvent("Locator"); } }
        double _RightTopX = 210;
        [EntitySilo, PropertyPanel(Label = "右上Y", Order = 4)]
        public double RightTopY { get { return _RightTopY; } set { _RightTopY = value; RaisePropertyChangedEvent("RightTopY"); RaisePropertyChangedEvent("Locator"); } }
        double _RightTopY = 297;

        [PropertyPanel(Order = -1)]
        public string Locator { get { return $"{LeftBottomX} {LeftBottomY},{LeftTopX} {LeftTopY},{RightBottomX} {RightBottomY},{RightTopX} {RightTopY}"; } }

    }
}
